package com.hdaccp.lettingagency.service.impl;

import com.hdaccp.lettingagency.dao.RoleDao;
import com.hdaccp.lettingagency.entity.Role;
import com.hdaccp.lettingagency.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao ;
    @Override
    public List<Role> findAll(String name,int limit,int offset) {
        return roleDao.query(name,limit,offset);
    }

    @Override
    public long findCount(String name) {
        return roleDao.getTotalCount(name);
    }
}
